using System;
using RayDen.Library.Components.Surface;
using RayDen.Library.Core.Primitives;

namespace RayDen.RayEngine.Engines.PathSpaceMLT
{
    public class PathVertex : ICloneable
    {
        public Point HitPoint;
        public Normal ShadeNormal;
        public ISurfaceMaterial Bsdf;
        public BsdfEvent Event;
        public Vector Wi, Wo;
        public RgbSpectrum ThroughtPut;
        public RgbSpectrum BsdfSample;
        public float BsdfWeight;
        public int TriangleIndex;
        public float RRProbability;

        public PathVertex()
        {
            RRProbability = 1f;
        }

        public object Clone()
        {
            return new PathVertex()
            {
                HitPoint = HitPoint,
                Bsdf = Bsdf,
                BsdfSample = BsdfSample,
                BsdfWeight = BsdfWeight,
                Event = Event,
                ShadeNormal = ShadeNormal,
                ThroughtPut = ThroughtPut,
                TriangleIndex = TriangleIndex,
                Wi = Wi,
                Wo = Wo
            };
        }
    }
}